import request from "@/utils/request"

export default
{
  /**
   * 多条件查询科室列表
   * @param current
   * @param limit
   * @param actQuery
   */
  pageDepartmentCondition(current,limit,departmentQuery)
  {
    return request
    ({
      method:"POST",
      url:`/yy/department/pageConditionDepartmentList/${current}/${limit}`,
      data: departmentQuery
    })
  },

  /**
   * 删除科室
   * @param id
   */
  deleteDepartmentById(id)
  {
    return request({
      method: 'GET',
      url:`/yy/department/deleteDepartment/${id}`,
    })
  },

  /**
   * 新增科室
   * @param departmentDto
   */
  addDepartment(departmentDto)
  {
    return request({
      method: 'POST',
      url:'/yy/department/addDepartment',
      data:departmentDto
    })
  },

  /**
   * 修改科室
   * @param updateDepartmentDto
   */
  updateDepartment(updateDepartmentDto)
  {
    return request({
      method: 'POST',
      url:'/yy/department/updateDepartment',
      data:updateDepartmentDto
    })
  },

  /**
   * 上传图片
   * @param multipartFile
   * @returns {AxiosPromise}
   */
  upLoadDepartmentImg(multipartFile)
  {
    return request({
      method: 'POST',
      url:'/yy/department/upLoadDepartmentImg',
      data:multipartFile
    })
  },

  /**
   * 上传图片
   * @param multipartFile
   * @returns {AxiosPromise}
   */
  deleteDepartmentImg(imageKey)
  {
    return request({
      method: 'POST',
      url:'/yy/department/deleteDepartmentImg',
      data:imageKey
    })
  }
}
